<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			.box{
				width: 200px;
				height: 200px;
				background-color: red;
				margin: 30px auto;
			}
		</style>
	</head>
	<body>
		<div class="box">
			
		</div>
	</body>
	<script type="text/javascript">
		var box = document.querySelector(".box");
		
//		var w = box.style.width;
//		var w = getComputedStyle(box).getPropertyValue("width");
		var w = getComputedStyle(box)["width"];
		console.log(w);
		
	</script>
</html>
